
/**
 * 商品
 * anthor liyingqi
 *  834777203@qq.com
 */

import { request } from "@/http/axios"
import type * as Good from './type';


// 列表 获取商品列表
export function getproductList(data: Good.goodRequestData) {
  return request<Good.GoodResponseData>({
    url: "?s=ApiBusiness/product_list",
    method: "post",
    data
  })
}
// 添加商品信息
export function getAddGoodsinfo(data: Good.CreateGoodsOtherInfoRequestData) {
  console.log(data,'datadata');

  return request<Good.CreateGoodsOtherInfoRequestData>({
    url: "?s=ApiBusiness/save",
    method: "post",
    data
  })
}

// 列表 更新营销活动
export function updateActivity(data: Good.activityRequestData) {
  return request<Good.ActivityResponseData>({
    url: "?s=ApiBusiness/yxhd",
    method: "post",
    data
  })
}

// 列表 商品置顶
export function topUp(data: Good.topUpRequestData) {
  return request<Good.TopUpResponseData>({
    url: "?s=ApiBusiness/zhiding",
    method: "post",
    data
  })
}
// 商品一级分类
export function getLevel1Classification() {
  return request({
    url: "?s=ApiShop/yjcate",
    method: "post",
  })
}
// 商品二级分类
export function getLevel2Classification(data:any) {
  return request({
    url: "?s=ApiShop/rjcate",
    method: "post",
    data
  })
}
// 商家发货地址
export function getBus_address(data:any) {
  return request({
    url: "?s=ApiBusiness/bus_address",
    method: "post",
    data
  })
}

// 列表 商品上架下架
export function setst(data: Good.setstRequestData) {
  return request<Good.TopUpResponseData>({
    url: "?s=ApiBusiness/setst",
    method: "post",
    data
  })
}

// 列表 商品删除
export function delProduct(data: Good.delRequestData) {
  return request<Good.TopUpResponseData>({
    url: "?s=ApiBusiness/del",
    method: "post",
    data
  })
}
// 列表 商品详情
export function getGoodDetails(data:any) {
  return request({
    url: "?s=ApiBusiness/getproduct",
    method: "post",
    data
  })
}
// 添加 商品草稿详情
export function getGoodDraft(data:any) {
  return request({
    url: "?s=ApiBusiness/getb_pcg",
    method: "post",
    data
  })
}
// 商家商品翻译
export function getGoodTranslate(data:any) {
  return request<Good.TopUpResponseData>({
    url: "?s=ApiBusiness/pro_translate",
    method: "post",
    data
  })
}













